<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
    <link type="text/css" rel="stylesheet" href="login/css/style.css"/>
    <script type="text/javascript" src="login/js/script.js"></script>
    <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>

    <script>
        $(function () {
            var token = sessionStorage.getItem("Authorization");
            console.log(token);

            $.ajax({
                type: 'get',
                url: "system/list",
                headers: {'Authorization': token},
                async: false,//同步/异步
                contentType: "application/json",
                dataType: 'json', //返回 JSON 数据
                success: function (data, status) {
                    console.log(data);
                    if (data.code == "601") {
                        sessionStorage.removeItem("Authorization");
                        //sessionStorage.clear();
                        alert(data.message);
                        window.location.href="login.html"
                    }
                },
                error: function (data, status, e) {
                    alert('接口调用错误！');
                }
            });
        })

    </script>
</head>
<body>
<div id="loginDiv">
    <h1 id="loginText">首页</h1>
    <audio controls  autoplay  ><source src="https://1480140172.oss-cn-shanghai.aliyuncs.com/content/voice/2022-08-01/e6469b3d35824c0f901687865ffd5301.aac?Expires=1659339317&OSSAccessKeyId=TMP.3KdAtK3yGQZ4Jzt7W3EhEGhZnGFbaoJQoEUnk5JbfZpRtrSEJiV7aupP1EgtHrGrUfinKk9FhhQj97ZVf7ZN26Fv1rDaA3&Signature=81SRUI4x6WW4jxusFOaESNGVMBI%3D"></audio>
    1
</div>
</body>
</html>
